package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 优惠活动规格实体类
 * 对应PHP的discount/ActiveSpec.php
 * 对应数据库表：discount_active_spec
 *
 * @author 谭陈强
 * @since 2025-01-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("yoshop_discount_active_spec")
@Schema(description = "优惠活动规格实体")
public class DiscountActiveSpec extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 优惠活动ID
     */
    @TableField("discount_id")
    @Schema(description = "优惠活动ID")
    private Long discountId;

    /**
     * 起订数量
     */
    @TableField("num")
    @Schema(description = "起订数量")
    private Integer num;

    /**
     * 活动价格
     */
    @TableField("price")
    @Schema(description = "活动价格")
    private BigDecimal price;

    /**
     * 小程序ID
     */
    @TableField("wxapp_id")
    @Schema(description = "小程序ID")
    private Long wxappId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private Long updateTime;
}
